﻿using System;
using System.Windows.Data;
using System.Windows.Media;

namespace Collab.Collab_Modules_VSPackage
{
    public class ColorTupleToBrushConverter : IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Tuple<byte, byte, byte> tuple = value as Tuple<byte, byte, byte>;
            Color color = Color.FromArgb(0xFF, tuple.Item1, tuple.Item2, tuple.Item3);
            return new SolidColorBrush(color);

        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
